package day05;

public class Student extends Person{
    //学号,成绩
    String stuId;
    double score;

    public Student(){
        System.out.println("student类的无参构造方法被调用");
    }
    public Student(String stuId,double score){
        this.stuId = stuId;
        this.score = score;
    }
    //学习的方法
    public void study(){
        System.out.println("good good study");
    }
    //考试的方法
    public void exam(){
        System.out.println("在考试");
    }

    public void eat(){
        System.out.println("学生在餐厅吃饭");
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuId='" + stuId + '\'' +
                ", score=" + score +
                '}';
    }
}
